package controller;

import java.io.IOException;
import java.util.ArrayList;

import javax.servlet.ServletException;

import com.dncompute.marrow.Controller;

/**
 * 
 * Access at:
 * http://localhost:8888/basicC
 * 
 * This is a controller which brings it all together (model + view) 
 * 
 * @author noelb
 *
 */
public class BasicC extends Controller {
	
	private static final long serialVersionUID = 1L;
	
	public void index() throws IOException, ServletException	{
		
		//Create a model object
		ArrayList<String> items = new ArrayList<String>();
		items.add("Anteater");
		items.add("Bear");
		items.add("Camel");
		
		//Place the model in the request
		req.setAttribute("items", items);
		
		//Let the view handle the display of the model
		forward("/view/viewc.jsp");
		
	}
	

}
